package com.cssp.dao;

import java.util.List;

import com.cssp.model.auth.Company;
import com.cssp.model.witkey.Task;
import com.cssp.model.witkey.TaskClassify;
import com.cssp.model.witkey.TaskState;

/**
 * ITaskDao
 * 
 * @author Johnny
 * 
 */
public interface ITaskDao {

	public String startTime_asc = "startTime ASC";
	public String startTime_desc = "startTime DESC";
	public String endTime_asc = "endTime ASC";
	public String endTime_desc = "endTime DESC";
	
	public Task findById(String id);

	public List<Task> find(TaskState state,
			String order, int firstResult, int maxResult);
	
	public List<Task> find(TaskClassify classify, TaskState state,
			String order, int firstResult, int maxResult);

	public void save(Task task);

	public void update(Task task);

	public void delete(Task task);

	public void deleteById(String id);
	
	public Long count(final Company owner);
	
	public Long count(final Company owner,final TaskState state) ;
	
	public List<Task> find(Company owner,TaskState state ,String order,int firstResult,int maxResult);
	
	public List<Task> find(Company owner,String order,int firstResult,int maxResult);
}
